// Code generated by MockGen. DO NOT EDIT.
// Source: ./pkg/conn/instance.go

// Package mock is a generated GoMock package.
package mock

import (
	tls "crypto/tls"
	reflect "reflect"

	gomock "github.com/golang/mock/gomock"
	pgproto3 "github.com/jackc/pgx/v5/pgproto3"
	conn "github.com/pg-sharding/spqr/pkg/conn"
)

// MockDBInstance is a mock of DBInstance interface.
type MockDBInstance struct {
	ctrl     *gomock.Controller
	recorder *MockDBInstanceMockRecorder
}

// MockDBInstanceMockRecorder is the mock recorder for MockDBInstance.
type MockDBInstanceMockRecorder struct {
	mock *MockDBInstance
}

// NewMockDBInstance creates a new mock instance.
func NewMockDBInstance(ctrl *gomock.Controller) *MockDBInstance {
	mock := &MockDBInstance{ctrl: ctrl}
	mock.recorder = &MockDBInstanceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDBInstance) EXPECT() *MockDBInstanceMockRecorder {
	return m.recorder
}

// Cancel mocks base method.
func (m *MockDBInstance) Cancel(csm *pgproto3.CancelRequest) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Cancel", csm)
	ret0, _ := ret[0].(error)
	return ret0
}

// Cancel indicates an expected call of Cancel.
func (mr *MockDBInstanceMockRecorder) Cancel(csm interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cancel", reflect.TypeOf((*MockDBInstance)(nil).Cancel), csm)
}

// Close mocks base method.
func (m *MockDBInstance) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockDBInstanceMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDBInstance)(nil).Close))
}

// Hostname mocks base method.
func (m *MockDBInstance) Hostname() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hostname")
	ret0, _ := ret[0].(string)
	return ret0
}

// Hostname indicates an expected call of Hostname.
func (mr *MockDBInstanceMockRecorder) Hostname() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockDBInstance)(nil).Hostname))
}

// Receive mocks base method.
func (m *MockDBInstance) Receive() (pgproto3.BackendMessage, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Receive")
	ret0, _ := ret[0].(pgproto3.BackendMessage)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Receive indicates an expected call of Receive.
func (mr *MockDBInstanceMockRecorder) Receive() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Receive", reflect.TypeOf((*MockDBInstance)(nil).Receive))
}

// ReqBackendSsl mocks base method.
func (m *MockDBInstance) ReqBackendSsl(arg0 *tls.Config) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ReqBackendSsl", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// ReqBackendSsl indicates an expected call of ReqBackendSsl.
func (mr *MockDBInstanceMockRecorder) ReqBackendSsl(arg0 interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReqBackendSsl", reflect.TypeOf((*MockDBInstance)(nil).ReqBackendSsl), arg0)
}

// Send mocks base method.
func (m *MockDBInstance) Send(query pgproto3.FrontendMessage) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Send", query)
	ret0, _ := ret[0].(error)
	return ret0
}

// Send indicates an expected call of Send.
func (mr *MockDBInstanceMockRecorder) Send(query interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDBInstance)(nil).Send), query)
}

// SetStatus mocks base method.
func (m *MockDBInstance) SetStatus(status conn.InstanceStatus) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "SetStatus", status)
}

// SetStatus indicates an expected call of SetStatus.
func (mr *MockDBInstanceMockRecorder) SetStatus(status interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStatus", reflect.TypeOf((*MockDBInstance)(nil).SetStatus), status)
}

// ShardName mocks base method.
func (m *MockDBInstance) ShardName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ShardName")
	ret0, _ := ret[0].(string)
	return ret0
}

// ShardName indicates an expected call of ShardName.
func (mr *MockDBInstanceMockRecorder) ShardName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardName", reflect.TypeOf((*MockDBInstance)(nil).ShardName))
}

// Status mocks base method.
func (m *MockDBInstance) Status() conn.InstanceStatus {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Status")
	ret0, _ := ret[0].(conn.InstanceStatus)
	return ret0
}

// Status indicates an expected call of Status.
func (mr *MockDBInstanceMockRecorder) Status() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockDBInstance)(nil).Status))
}

// Tls mocks base method.
func (m *MockDBInstance) Tls() *tls.Config {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Tls")
	ret0, _ := ret[0].(*tls.Config)
	return ret0
}

// Tls indicates an expected call of Tls.
func (mr *MockDBInstanceMockRecorder) Tls() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tls", reflect.TypeOf((*MockDBInstance)(nil).Tls))
}
